The invention relates generally to exchanging data over a network and more specifically to allocating bandwidth on a high-speed network switch bus.
Networks are commonly used to interconnect computers or other devices. As the number of network computers increases so does the demand for network bandwidth. Network switches act to divide networks into sub-networks. As fewer computers are connected to one sub-network, the bandwidth of the sub-network is shared among fewer computers. Nonetheless, a computer on one sub-network may need to communicate with a computer on another sub-network. A network switch is responsible for providing the communication link between the two sub-networks. A network switch may also act to provide a communication link between two individual computers, or between an individual computer and a sub-network.
As with the sub-networks, the network switch has only limited bandwidth capacity. Where a large number of computers are connected using a network switch, the sum of the computer bandwidths may exceed greatly the bandwidth capacity of the network switch.
During normal operation, conversations between computers may occur within a sub-network. These conversations do not require bandwidth from the network switch. However, during peak operation, bandwidth demand on the switch bus may exceed capacity. During such periods, the network switch must determine how to allocate the available bandwidth. As the conversation data may include a priority field, higher priority data should be transmitted before lower priority data.
To effectively perform this allocation, a network switch must monitor the number of active conversations. Otherwise, the network switch may oversubscribe the available bandwidth and lose data. To avoid such data loss, a network switch must determine whether the available bandwidth is fully subscribed. If so, the network switch must delay additional conversations until some of the current conversations terminate.
The effective monitoring of bandwidth usage presents a complex problem, especially where a network switch interconnects sub-networks operating under different protocols. The beginning portion of a conversation packet will include a length field. Using the length field and the transmission speed, a network switch can determine the conversation""s transmission requirements both in terms of time and bandwidth. If the conversation is begun, the network switch can use this information to monitor the loading of its bandwidth resources.
For example, a network switch may time each conversation to determine when it will terminate. When the conversation terminates, the network switch may reallocate bandwidth resources to other conversations. Individual timers, however, require expensive firmware.
The maximum amount of time a conversation must wait before the allocation of bandwidth is termed bus latency. To minimize bus latency, a network switch may divide a conversation into sub-packets or cells. The network switch will transmit only one of the sub-packets at a time instead of the longer conversation. This reduces bus latency because other conversations are given bus access after the completion of a sub-packet instead of after completion of the entire conversation. While this acts to reduce bus latency, the division into smaller packets requires additional overhead. For example, the network switch may need to attach a destination address to each of the sub-packets to ensure that they are properly routed. The network switch may also require handshaking to ensure that the sub-packets are properly received. These operations consume switch bandwidth that might otherwise be allocated to additional conversations.
Accordingly, a method of transmitting data over a network switch is desired which acts to minimize bus latency and to maximize bandwidth allocation to conversation data. At the same time, the network switch must act to ensure that conversations are started only if bandwidth is currently available. To this end, the method should accurately monitor current bandwidth usage. The method should allocate any available bandwidth based upon priority. This monitoring and allocation should be implemented using minimal firmware.
According to one aspect of the invention, a network switch suitable for interconnecting networks includes a plurality of ports, a receive FIFO and a switch bus. The plurality of ports are configured to receive frames from a network and divide the frames into cells, wherein each of the cells include a source port field. The receive FIFO is operationally coupled with the plurality of ports and is configured to receive the cells from the plurality of ports. The switch bus interface is operationally coupled with the receive FIFO and is configured to receive the cells from the receive FIFO and transmit the cells over a switch bus.
According to another aspect of the invention, a network switch suitable for interconnecting network devices includes a plurality of ports, a receive FIFO and a transmit FIFO. The plurality of ports is configured to send data to and receive data from a plurality of network devices. The receive FIFO is configured to receive data from the plurality of ports. The transmit FIFO is configured to transmit data to the plurality of ports. The bus interface is operationally coupled with the receive FIFO and the transmit FIFO and is configured to monitor a switch bus and to transmit and receive data over the switch bus. The bus interface includes a bandwidth counter and a decrement FIFO. The bandwidth counter is configured to increment after detection of a start-of-frame field and to decrement after detection of an end-of-frame field. The decrement FIFO is operationally coupled with the bandwidth counter. The bus interface is configured to store end-of-frame data on the decrement FIFO and to decrement the bandwidth counter after the end-of-frame data has been stored on the decrement FIFO for a latency period.
According to another aspect of the invention, frame data is received from a first port. The frame data is divided into cells, wherein each of the cells include a source port field. The cells are transmitted over a switch bus. The cells are received from the switch bus. The data cells are routed to a second port based upon the source port field.